<?php

namespace Admin\Controller;
use Think\Controller;

class OrderController extends CommonController {
    public function index(){
    	$this->display('index');
    }
    
    public function ajaxpage(){
    	$p = M('order'); 
		$count = $p->count();
		$Page = new \Think\Ajaxpage($count,10);
		$Page->setConfig('prev','上一页');
		$Page->setConfig('next','下一页');
		$Page->setConfig('first','首页');
		$Page->setConfig('last','尾页');
		$list = $p->order('id')->limit($Page->firstRow.','.$Page->listRows)->select();
		$show = $Page->show();// 分页显示输出
		$arr=array(
			"list"=>$list,
			"show"=>$show
		);
		$this->ajaxReturn($arr);
    }
}